Skip to content

Conversation

@ryanaidilp
Copy link
Owner

Status

READY

Description

✨ Enhance Discord Notification Script

Summary

This update improves the GitHub Actions script for sending Discord notifications when a new Pull Request is opened.

✅ What's Changed

  • Added support for manual trigger via workflow_dispatch with input fields.

  • Excluded the PR author from the reviewer mentions.

  • Mapped the PR author to a Discord mention, using fallback to username if no mapping exists.

  • Cleaned and refactored logic for handling CODEOWNERS and Discord mentions.

  • Ensured the message includes:

    • Repository name
    • PR title and link
    • Mention to PR author
    • Reviewers (excluding the author), mapped to Discord IDs if possible

🧪 Manual Testing

You can manually trigger the workflow from the Actions tab using the "Run workflow" button and input mock PR data to test.

📌 Notes

  • The DISCORD_MAP is securely passed via GitHub Secrets.
  • The CODEOWNERS file must exist in .github/CODEOWNERS for reviewer mentions to work.

🔗 Example Output

📣 Pull Request Baru di **repo-name** oleh <@123456789012345678>
🔗 [Improve widget layout](https://github.com/org/repo/pull/123)
<@987654321098765432> @reviewer2 mohon review ya 🙏

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@ryanaidilp ryanaidilp self-assigned this May 20, 2025
@ryanaidilp ryanaidilp requested a review from rii92 as a code owner May 20, 2025 11:36
@ryanaidilp ryanaidilp added enhancement New feature or request github_actions Pull requests that update GitHub Actions code refactor Improvements or changes to code labels May 20, 2025
@codecov
Copy link

codecov bot commented May 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.28%. Comparing base (c50809f) to head (dbbf7bd).
Report is 38 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #101      +/-   ##
===========================================
- Coverage    99.29%   95.28%   -4.01%     
===========================================
  Files           83       83              
  Lines         1271     1231      -40     
===========================================
- Hits          1262     1173      -89     
- Misses           9       58      +49     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ryanaidilp ryanaidilp merged commit faf443b into develop May 20, 2025
6 of 7 checks passed
@ryanaidilp ryanaidilp deleted the refactor/update-discord-workflow branch May 20, 2025 15:09
ryanaidilp added a commit that referenced this pull request May 21, 2025
* ci(workflow): make notify pr can be run manually

* ci(workflow): exclude author from reviewer and mention author

* ci(workflow): remove unused lcov pattern

* ci(workflow): remove unused lcov pattern from main.yaml

* ci(workflow): fix typo base network interceptor

* ci(workflow): remove more unused pattern

* ci(workflow): exclude generated file

* ci(workflow): add more codeowner

* ci(workflow): auto publish to pub.dev
ryanaidilp added a commit that referenced this pull request May 23, 2025
* ci(workflow): make notify pr can be run manually

* ci(workflow): exclude author from reviewer and mention author

* ci(workflow): remove unused lcov pattern

* ci(workflow): remove unused lcov pattern from main.yaml

* ci(workflow): fix typo base network interceptor

* ci(workflow): remove more unused pattern

* ci(workflow): exclude generated file

* ci(workflow): add more codeowner

* ci(workflow): auto publish to pub.dev
ryanaidilp added a commit that referenced this pull request May 25, 2025
* ci(workflow): make notify pr can be run manually

* ci(workflow): exclude author from reviewer and mention author

* ci(workflow): remove unused lcov pattern

* ci(workflow): remove unused lcov pattern from main.yaml

* ci(workflow): fix typo base network interceptor

* ci(workflow): remove more unused pattern

* ci(workflow): exclude generated file

* ci(workflow): add more codeowner

* ci(workflow): auto publish to pub.dev
ryanaidilp added a commit that referenced this pull request Jun 2, 2025
* ci(workflow): make notify pr can be run manually

* ci(workflow): exclude author from reviewer and mention author

* ci(workflow): remove unused lcov pattern

* ci(workflow): remove unused lcov pattern from main.yaml

* ci(workflow): fix typo base network interceptor

* ci(workflow): remove more unused pattern

* ci(workflow): exclude generated file

* ci(workflow): add more codeowner

* ci(workflow): auto publish to pub.dev
ryanaidilp added a commit that referenced this pull request Jul 6, 2025
* build(deps): bump codecov/codecov-action from 4 to 5 (#82)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(dependencies): upgrade dependencies

* chore(doc): upgrade docs dependencie constraint

* feat(constant): create query param constant & injector constant

* refactor(di): use injector constant

* refactor(api_endpoint): update api endpoint implementation

* refactor(color): use withValues

* chore(dependencies): run melos upgrade

* chore(pubs): add topics

* test(data_source): fix test failed with variable data source

* chore(deps): update dependency constraints

* fix(comments): fix switched comment between detail and get method

* chore(deps): upgrade to sdk 3.7

* style(format): run dart format

* feat([ANDROID] example): update example app android to kotlin dsl

* fix(errors): proper error handling for api call

* chore(deps): update dependency

* build(deps): bump codecov/codecov-action from 4 to 5 (#84)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* refactor(workflow): update discord notification workflow (#101)

* ci(workflow): make notify pr can be run manually

* ci(workflow): exclude author from reviewer and mention author

* ci(workflow): remove unused lcov pattern

* ci(workflow): remove unused lcov pattern from main.yaml

* ci(workflow): fix typo base network interceptor

* ci(workflow): remove more unused pattern

* ci(workflow): exclude generated file

* ci(workflow): add more codeowner

* ci(workflow): auto publish to pub.dev

* feat(CENSUS): integrating census data endpoint (#96)

* build(deps): bump codecov/codecov-action from 4 to 5 (#82)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(dependencies): upgrade dependencies

* build(deps): bump codecov/codecov-action from 4 to 5 (#84)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump codecov/codecov-action from 4 to 5 (#82)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump codecov/codecov-action from 4 to 5 (#84)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump codecov/codecov-action from 4 to 5 (#82)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump codecov/codecov-action from 4 to 5 (#84)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump codecov/codecov-action from 4 to 5 (#82)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump codecov/codecov-action from 4 to 5 (#84)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump codecov/codecov-action from 4 to 5 (#82)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump codecov/codecov-action from 4 to 5 (#84)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump codecov/codecov-action from 4 to 5 (#82)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump codecov/codecov-action from 4 to 5 (#84)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump codecov/codecov-action from 4 to 5 (#82)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump codecov/codecov-action from 4 to 5 (#84)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump codecov/codecov-action from 4 to 5 (#82)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump codecov/codecov-action from 4 to 5 (#84)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(puib): install meta

* feat(entities): create census entitty

* feat([DOMAIN] repositories): create census repository

* refactor(usecase): update usecase contract

* feat([DOMAIN] usecases): create get list of census use case

* feat(domain): create domain barrel file

* feat([FEATURES] census-data): create barrel file of censu data & export domain

* feat([DATA] models): create census model

* feat([DATA]): create barrel file for data

* refactor([ENDPOINT]): add census endpoint

* feat(features): export census data features

* feat([DATA]): export data from feature barrel

* feat([FAILURES]): create exception & failure for census data

* feat([DATA] datasources): create census data remote data source

* refactor([DATA] datasources): rename census data remote data source

* feat([DATA] repositories): create census repository implementation

* feat([INJECTOR]): create census data injector

* feat(SDK): export census and register census data injector

* test(fixture): create census list fixture

* test([USECASE]): create get list of census test

* refactor([EXCEPTIONS]): fix typo in exception nam

* test([DATASOURCE]): create census remote data source

* test([DATA][REPOSITORIES]): write unit test for census repository impl

* feat(list): add census to list

* fix([HTTP]): create new interoparibility client

* feat(localizations): create localizations for census feature

* feat(widgets): create pagination info widget

* feat(widget): create property tile widget

* feat([SHOWCASE][CENSUS]): create showcase example for censuses

* feat(models): add census topic entity

* fix(locale): fix wrong localization

* feat([DOMAIN] repositories): add method to get census topics

* feat([DOMAIN] usecases): create get list of census topic

* feat([INJECTOR]): inject get list of census topic

* feat([DATA] models): create census topic model

* refactor(failures): create census topic exception and failure

* refactor([NETWORK]): make network client cancellable

* feat([DATASOURCE]): test cancelable and implement census topics

* fix([DATASOURCE]): fix missing event param

* refactor(constants): add event to query param constant

* feat([DATA] repositories): create census repository impl

* refactor(SDK): export census topic class

* refactor(class): separate stadata list contract & implementation

* feat([SHOWCASE][CENSUS_TOPIC]): create census topic showcase view

* test(fixture): create fixture for census topic

* test([USECASES]): write unit test for get list of census topics

* test([DATASOURCES]): write test for getCensusTopics method

* test([REPOSITORIES]): write unit test for getCensusTopics

* feat(exception): create census area exception

* feat(failure): create census area failure

* style(linter): update linter rule for example app

* feat(entities): create census area entity

* feat(domain-repo): add getCensusArea method

* feat(usecase): create get list of census area usecase

* feat(models): create census area model

* feat(datasource): add getCensusArea method

* feat(data-repo): create implementation of getCensusArea

* feat(injector): register get list of census area usecase

* test(fixture): add fixture for census area list

* test(usecase): create test for get list of census area

* test(datasource): write test for getCensusArea method

* feat(list): add censusEventAreas method to stadata list

* feat(list): write down the censusEventAreas implementation

* test(list): add missing dependency

* fix(pub): add uses material design to root pub

* ci(workflow): add ignore errors param

* feat(git): add git attributes

* ci(workflow): move ignore error param

* feat(census_dataset): create census dataset entity

* feat(repository): add getCensusDatasets method

* refactor(repository): update topicID data type

* feat(usecase): create get list of census datasets usecase

* test(fixture): add fixture for census datasets

* feat(model): create census dataset model

* test(usecase): write unit test for get list of census datasets

* refactor(repository): override getCensusDatasets in repository impl

* chore(pub): run flutter upgrade

* chore(pub): run flutter pub upgrade

* chore(linter): use very good analysis versino 9

* style(code): run melos fix to fix code styling

* feat(injector): register datasets list usecase to injector

* chore(linter): add preserve traiing comma rule

* style(code): run melos format

* feat(list): add censusEventDataset method to stadata list

* test(list): register get dataset list mock

* fix(pub): add uses-material-design: true

* refactor(census): fix linter error & add doc comment

* chore(model): rename property & add doc comment

* chore(example): create example for census datasets

* feat(failures): create exception & failures for feature

* fix(key): fix wrong key name for topik

* refactor(census): refactor census related class

* test(list): update list test

* chore(pub): run flutter pub upgrade

* feat(example): generate locale and routes

* docs(docs): update docs

* chore(census): update census feature implementation

* chore(example): add example for census

* refactor(gradle): update ndk version

* ci(workflow): add new workflow to publish release

* feat(script): create script to generate changelog

* docs(scripts): create readme for changelog generator

* docs(docs): update docs of stadata

* refactor(git): update pr template

* style(code): run dart fix & dart format

* style(code): fix some linter issue

* docs(docs): update roadmap & census docs

* docs(claude): initialize claude code rule

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(pub): bump package version

* docs(CHANGELOG): update changelog

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request github_actions Pull requests that update GitHub Actions code refactor Improvements or changes to code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants